package SiTuQingYou.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * Servlet implementation class ExitLoginServlet
 */
@WebServlet("/ExitLoginServlet")
public class ExitLoginServlet extends BaseAction {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ExitLoginServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

    protected void ExitLogin(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	HttpSession hs = request.getSession();
    	hs.invalidate();
    	String path = request.getContextPath();
    	
    	response.sendRedirect(path+"/index/index.jsp");
    }
    
    
    
    protected void doDefault(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		// TODO Auto-generated method stubr
		
	}
}
